﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KAImage.Config
{
    public class KAConfigs
    {
        private static ConfigService _data = ConfigService.GetInstance();
        public static ConfigService Data
        {
            get { return _data; }
        }
       
        /// <summary>
        /// 算法应用选项
        /// </summary>
        public static AlgorithmApplyingOption AlgorApplying
        {
            get
            {
                return (AlgorithmApplyingOption)ConfigService.GetConfig(typeof(AlgorithmApplyingOption));
            }
            set
            {
                _data[typeof(AlgorithmApplyingOption)] = value;
            }
        }

        /// <summary>
        /// 文件浏览选项
        /// </summary>
        public static BrowseOption Browse
        {
            get
            {
                return (BrowseOption)ConfigService.GetConfig(typeof(BrowseOption));
            }
            set
            {
                _data[typeof(BrowseOption)] = value;
            }
        }

        /// <summary>
        /// 模糊和锐化选项
        /// </summary>
        public static BlurSharpenOption BlurSharpen
        {
            get
            {
                return (BlurSharpenOption)ConfigService.GetConfig(typeof(BlurSharpenOption));
            }
            set
            {
                _data[typeof(BlurSharpenOption)] = value;
            }
        }

        /// <summary>
        /// 色相/饱和度/亮度调整选项
        /// </summary>
        public static ImageHSLOffset HSLOffset
        {
            get
            {
                return (ImageHSLOffset)ConfigService.GetConfig(typeof(ImageHSLOffset));
            }
            set
            {
                _data[typeof(ImageHSLOffset)] = value;
            }
        }

        /// <summary>
        /// 色阶调整选项
        /// </summary>
        public static ImageLevelsOption Levels
        {
            get
            {
                return (ImageLevelsOption)ConfigService.GetConfig(typeof(ImageLevelsOption));
            }
            set
            {
                _data[typeof(ImageLevelsOption)] = value;
            }
        }

        /// <summary>
        /// 曲线调整选项
        /// </summary>
        public static ImageCurveOption Curves
        {
            get
            {
                return (ImageCurveOption)ConfigService.GetConfig(typeof(ImageCurveOption));
            }
            set
            {
                _data[typeof(ImageCurveOption)] = value;
            }
        }

        /// <summary>
        /// 图像合成选项
        /// </summary>
        public static ImageMegreOption Merge
        {
            get
            {
                return (ImageMegreOption)ConfigService.GetConfig(typeof(ImageMegreOption));
            }
            set
            {
                _data[typeof(ImageMegreOption)] = value;
            }
        }
    }
}
